<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pages')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="pagesList" item="vo"}
                <label for="row[pages]-{$key}"><input id="row[pages]-{$key}" name="row[pages]" type="radio" value="{$key}" {in name="key" value="$type"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" data-rule="required" class="form-control" name="row[title]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{if $type == 2}轮播图片(手机端){else /}轮播图片(小程序){/if}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" data-rule="required" class="form-control" size="50" name="row[image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            </br>
            <div>{if $type == 2}手机端{else /}小程序{/if}图片建议尺寸比例(2:1)</div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    {if $type !=5}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Pc_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-pc_image" data-rule="required" class="form-control" size="50" name="row[pc_image]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-pc_image" class="btn btn-danger faupload" data-input-id="c-pc_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-pc_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-pc_image" class="btn btn-primary fachoose" data-input-id="c-pc_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-pc_image"></span>
            </div>
            </br>
            <div>PC图片建议尺寸比例({if $type == 1}3:1{else /}5:1{/if})</div>
            <ul class="row list-inline faupload-preview" id="p-pc_image"></ul>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Jump_type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="jumpTypeList" item="vo"}
                <label for="row[jump_type]-{$key}"><input id="row[jump_type]-{$key}" name="row[jump_type]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group teletext">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>
    <div class="form-group page-url hide">
        <label class="control-label col-xs-12 col-sm-2">内部页面:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-jump_link" readonly class="form-control selectpage" data-primary-key="url" data-source="wdsxh/link/index" name="row[jump_link]" type="text">
        </div>
    </div>
    <div class="form-group page-url hide">
        <label class="control-label col-xs-12 col-sm-2">页面参数:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-param" class="form-control" name="row[param]" type="text" placeholder="如需设置页面参数请输入参数信息，如“id=1&cat=2”，否则为空即可">
        </div>
    </div>
    <div class="form-group outer-url hide">
        <label class="control-label col-xs-12 col-sm-2">外部链接:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-jump_h5" class="form-control" name="row[jump_h5]" type="text" placeholder="输入完整网址链接，如“http://www.baidu.com”">
            <span class="help-block">注意：外部链接必须在小程序控制台设置业务域名</span>
        </div>
    </div>
    <div class="form-group wxapp hide">
        <label class="control-label col-xs-12 col-sm-2">小程序Appid:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-wxapp-appid" class="form-control" name="row[wxapp][appid]" type="text" placeholder="输入要跳转的小程序Appid信息">
        </div>
    </div>
    <div class="form-group wxapp hide">
        <label class="control-label col-xs-12 col-sm-2">页面路径:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-wxapp-path" class="form-control" name="row[wxapp][path]" type="text" placeholder="输入要跳转的小程序页面路径，如“/page/index/index”">
        </div>
    </div>
    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-status" data-rule="required" class="form-control selectpicker" name="row[status]">
                {foreach name="statusList" item="vo"}
                <option value="{$key}" {in name="key" value="1"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" data-rule="required" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
